package com.huangjue.backend.service.impl;

import com.huangjue.backend.entity.HomeworkFinished;
import com.huangjue.backend.mapper.HomeworkFinishedMapper;
import com.huangjue.backend.service.HomeworkFinishedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class HomeworkFinishedServiceImpl implements HomeworkFinishedService {

    @Autowired
    private HomeworkFinishedMapper homeworkFinishedMapper;

    @Override
    public int insert(HomeworkFinished homeworkFinished) {
        return homeworkFinishedMapper.insert(homeworkFinished);
    }

    @Override
    public HomeworkFinished selectByUserIdAndHomeworkId(Integer userId, Integer homeworkId) {
        return homeworkFinishedMapper.selectByUserIdAndHomeworkId(userId, homeworkId);
    }

    @Override
    public List<HomeworkFinished> selectByUserIdAndHomeworkIds(Integer userId, List<Integer> homeworkIds) {
        return homeworkFinishedMapper.selectByUserIdAndHomeworkIds(userId, homeworkIds);
    }
}
